package com.miyu.common.pojo.system;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

import lombok.Data;
import org.hibernate.annotations.UpdateTimestamp;

/**
 * 规则表;
 * @author : miyu
 * @date : 2022-9-30
 */
@ApiModel(value = "规则表",description = "")
@Data
@Entity
@Table(name="sys_rule")
public class SysRule implements Serializable,Cloneable{
    /** 主键 */
    @Id
    @ApiModelProperty(name = "主键",notes = "")
    @Column(name = "rule_id", nullable = false, length =32 )
    private String ruleId ;
    /** 是否停用 */
    @ApiModelProperty(name = "是否停用",notes = "")
    @Column(name = "is_stop", nullable = true, length =1 )
    private String isStop = "0" ;
    /** 搜索 */
    @ApiModelProperty(name = "搜索",notes = "")
    @Column(name = "root_search", nullable = true, length =255 )
    private String rootSearch ;
    /** 根域名 */
    @ApiModelProperty(name = "根域名",notes = "")
    @Column(name = "root_source", nullable = true, length =255 )
    private String rootSource ;
    /** 规则类型;1:书籍;2.电影 3 图片 等不同类型处理不一样 */
    @ApiModelProperty(name = "规则类型",notes = "1:书籍;2 图片 3.电影  等不同类型处理不一样")
    @Column(name = "rule_type", nullable = true, length =255 )
    private String ruleType ;
    /** 请求类型;请求类型 一般pots /get/put 等 */
    @ApiModelProperty(name = "请求类型",notes = "请求类型 一般pots /get/put 等")
    @Column(name = "root_method", nullable = true, length =20 )
    private String rootMethod ;
    /** 规则名称 */
    @ApiModelProperty(name = "规则名称",notes = "")
    @Column(name = "rule_name", nullable = true, length =50 )
    private String ruleName ;
    /** 规则设置 */
    @ApiModelProperty(name = "规则设置",notes = "")
    @Column(name = "rule_set", columnDefinition="json",nullable = true )
    private String ruleSet ;

    /** 操作日期 */
    @UpdateTimestamp
    @ApiModelProperty(name = "操作日期",notes = "")
    @Column(name = "update_time",columnDefinition = "timestamp default current_timestamp",nullable = false)
    private Timestamp updateTime ;
}